
<p class="ui-state-default ui-corner-all ui-helper-clearfix"><img src="theme/ikonky/folder.png" align="absmiddle"> Přehled kategorií</p>
<?php
	if($exception == "empty_result")
	{
		$this->empty_result();
	}
	else if($exception == "thrown_exception")
	{
		echo "<p class='ui-state-error ui-corner-all'>".$exception_messsage."</p>";
	}
	else if(is_null($exception))
	{
		echo '
		<div class="tabulka">
			<table align="center" rules="all">
				<tr align="center" class="ui-widget-header">
					<td><img src="theme/ikonky/folder.png" align="absmiddle"> Název</td>
					<td><img src="theme/ikonky/note.png" align="absmiddle"> Poznámka</td>
					<td><img src="theme/ikonky/wrench.png" align="absmiddle"></td>
				</tr>
		';
		while($row = mysql_fetch_array($category_list))
		{
			echo "
				<tr align='center'>
					<td>$row[name]</td>
					<td>$row[note]</td>
			";
			if($row["id"] != 1)
			{
				echo"
					<td>
						<a href='index.php?modul=articles&subpage=edit_category&id=$row[id]'><img src='theme/ikonky/folder_edit.png' align='absmiddle'></a>
						<a href='index.php?modul=articles&subpage=delete_category&id=$row[id]'><img src='theme/ikonky/folder_delete.png' align='absmiddle'></a>
					</td>
				</tr>
				";
			}
		}
		echo '</table></div>';
	}
	?>
	<p align="center">
		<a href="index.php?modul=articles&subpage=add_category" class="button">
			<img src="theme/ikonky/folder_add.png" align="absmiddle"> Nová kategorie
		</a>
	</p>